package com.hxk.createMode.builder;

public class HuaweiPhoneDirector implements PhoneDirector {

	private PhoneBuilder phoneBuilder;
	
	public HuaweiPhoneDirector(PhoneBuilder phoneBuilder) {
		this.phoneBuilder = phoneBuilder;
	}

	@Override
	public Phone directorPhone() {
		Receiver receiver = this.phoneBuilder.receiverBuilder();
		Screen screen = this.phoneBuilder.screenBuilder();
		Shell shell = this.phoneBuilder.shellBuilder();
		Phone phone = new Phone();
		phone.setReceiver(receiver);
		phone.setScreen(screen);
		phone.setShell(shell);
		return phone;
	}

}
